<template>
    <div>
        <h1>Test Event Bus</h1>
        <el-button @click="emit">emit</el-button>
        <child />
    </div>
</template>

<script lang="ts">
export default { name: '' }
</script>

<script lang="ts" setup>
import { getCurrentInstance, ComponentInternalInstance, reactive, ref, nextTick, onMounted, useAttrs, useSlots } from 'vue'
import child from './sub.vue'
import EventBus from '@/hooks/useEventBus'

// const slots = useSlots()
// const attrs = useAttrs()
// const emits = defineEmits()
const { proxy } = getCurrentInstance() as ComponentInternalInstance

const state = reactive({
    test: 1
})

const emit = () => {
    EventBus.$emits('test', state.test++)
}

// defineExpose({

// })
</script>
<style lang="scss" scoped></style>
